$("document").ready(function(){
	$.ajax({
		url : "customer/updatePersonalInfoSuccess",
		type : "GET",
		success : function(data) {
			if (data=="true") {
				alert("个人信息修改成功")
            }
		}
	});
	$.ajax({
		url : "customer/updatePasswordSuccess",
		type : "GET",
		success : function(data) {
			if (data=="true") {
				alert("密码修改成功")
            }
		}
	});
	$.ajax({
		url : "customer/updateIdentityCardSuccess",
		type : "GET",
		success : function(data) {
			if (data=="true") {
				alert("我的证件修改成功")
            }
		}
	});
	$.ajax({
		url : "customer/getNameStar",
		type : "GET",
		success : function(data) {
			if (data.nameStar!=null&&data.nameStar!="") {
				var $nameStar = $('#nameStar');
				$nameStar.text(data.nameStar);
            }
		}
	});
	$.ajax({
		url : "customer/getMobilePhoneStar",
		type : "GET",
		success : function(data) {
			if (data!=null&&data!="") {
				var $mobilePhoneStar = $('#mobilePhoneStar');
				$mobilePhoneStar.text(data);
            }
		}
	});
});

/*window.confirm = function(name){
	 var iframe = document.createElement("IFRAME");
	iframe.style.display="none";
	iframe.setAttribute("src", 'data:text/plain,');
	document.documentElement.appendChild(iframe);
	window.frames[0].window.confirm(name);
	iframe.parentNode.removeChild(iframe);
};*/

window.alert = function(name){
	 var iframe = document.createElement("IFRAME");
	iframe.style.display="none";
	iframe.setAttribute("src", 'data:text/plain,');
	document.documentElement.appendChild(iframe);
	window.frames[0].window.alert(name);
	iframe.parentNode.removeChild(iframe);
};

/*绑定提交按钮事件*/
$('#logout').on('click', function(){
	if(confirm('您确定要进行退出登录吗?')){
		window.location.href = "logout";
 	}
});
